<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Personinfoapi extends Model
{
    protected $table ='users';
    public $timestamps = false;
    protected $guarded = [
        'title', 'img', 'redirect_url', 'sort', 'on_line_time', 'off_line_time', 'created_at', 'updated_at'
    ];

    public function getData(){
        global $g_uid;
        $id=$g_uid;
        $partnerList = array();
        $sql = \DB::table($this->table)
            ->whereNull('deleted_at')
            ->where('id',$id);

        $partnerList['list'] = $sql->select('id','nick_name','headimgurl','totalPoints','presentPoints','wx_openid','user_level')

            ->get();
        $partnerList['id']=$id;
        return $partnerList;
    }


}